<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <style>
    .active {
      width: 200px;
      height: 50px;
      background: blue;
      color: white;
    }
  </style>
</head>

<body>

  <div id="app">

    <!-- <div :class="{active:isActive,error:true}">太原2003</div>

    <div :class="classObj">太原2003</div> -->

    <!-- <div :class="[classa,classb]">太原2003</div> -->

    <!-- <custom-count class="active"></custom-count> -->

    <div :style="{'font-size':size + 'px',color:'red'}">太原2003</div>

    <div :style="styleObj">太原2003</div>

  </div>
  <script>

    Vue.component('custom-count', {
      template: `<div class="foo">
      <span>0</span>
      <button>increment</button>
      </div>`
    })

    var vm = new Vue({
      el: "#app",
      data: {
        isActive: false,
        classObj: {
          active: false,
          error: true
        },
        classa: 'active',
        classb: 'error',
        size:30,
        styleObj:{
          'font-size':'30px',
          color:'red'
        }
      }
    })
  </script>
</body>

</html>